package com.financing.platform.web;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import com.financing.platform.service.IBankCardService;
import com.financing.platform.util.Dict;
import com.financing.platform.vo.BankCardVO;

/**
 * 
 * @ClassName: BankCardAction
 * @Description: 银行卡Action 
 * @author  lisu
 *
 */
@Controller
public class BankCardAction extends BaseAction{
	
	@Autowired
	private IBankCardService bankCardServiceImpl;
	
	/**
	 * 
	 * @Title: queryBankCard
	 * @Description: 银行卡统计 
	 * @param @param request
	 * @param @param response
	 * @param @param BankCardVO
	 * @param @return   
	 * @return ModelAndView   
	 * @throws
	 */
	@RequestMapping("/queryBankCard.shtml")
	public ModelAndView queryBankCard(HttpServletRequest request,
			HttpServletResponse response,BankCardVO cardVO) {
		
		this.log.info("begin queryBankCard info!");
		
		request.getSession().setAttribute(Dict.requestID, "queryBankCard.shtml");
		
		Map<String,Object> resultMode = new HashMap<String,Object>();
		
		try{
			
			List<BankCardVO> bankCardVOs = bankCardServiceImpl.queryBankCardList(cardVO);
			resultMode.put("list", bankCardVOs);
			resultMode.put("bean",cardVO);
			
		}catch(Exception e){
			this.log.error("error queryBankCard",e);
		}
		this.log.info("end queryBankCard info access !");
		return new ModelAndView("bankCardList", resultMode);
	}
	
}
